<link rel="stylesheet" href="__CSS__/mall.css"/>

<script src="__STATIC__/js/ace-extra.min.js"></script>
<script src="__STATIC__/js/laydate.js"></script>
<div class="page-header mbx">
    <h1>
        <small>
            {$companyName}分公司管理 ｜采购申请列表 <i class="ace-icon fa fa-times xx"></i>
        </small>
    </h1>
</div>
<div class="mbx" style="padding-bottom: 200px;">
    <div class="widget-box transparent">
        <div class="nav-tab" style="position: relative">
            <ul class="nav-tab-title ">
                <li class="nav-this">采购初审列表</li>
            </ul>
        </div>
        <div class="widget-body">
            <div class="widget-main padding-10">
                <div class="row">
                    <div class="col-xs-12">
                        <form class="form-horizontal s_input-bgcolor" method="post">
                            <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label text-right no-padding-right" >申请类型： </label>
                                    <div class="col-sm-8" style="padding: 0;">
                                        <select name="sApplyType" class="form-control">
                                            <option>全部</option>
                                            <option value="1" {if condition="$sApplyType == 1"}selected{/if}>新公司筹建</option>
                                            <option value="2" {if condition="$sApplyType == 2"}selected{/if}>其他</option>
                                        </select>

                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label text-right no-padding-right" >审核状态： </label>
                                    <div class="col-sm-8" style="padding: 0;">
                                        <select name="sStatus" class="form-control">
                                            <option>全部</option>
                                            <option value="1" {if condition="$sStatus == 1"}selected{/if}>未审核</option>
                                            <option value="2" {if condition="$sStatus == 2"}selected{/if}>初审通过</option>
                                            <option value="3" {if condition="$sStatus == 3"}selected{/if}>初审未通过</option>
                                            <option value="4" {if condition="$sStatus == 4"}selected{/if}>终审通过</option>
                                            <option value="5" {if condition="$sStatus == 5"}selected{/if}>终审不通过</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label text-right no-padding-right" for="form-field-1-3">申请说明： </label>
                                    <div class="col-sm-8">
                                        <input type="text" name="sApplyExplain" id="form-field-1-3" placeholder="请输入关键字" value="{$sApplyExplain}" class="form-control">
                                    </div>
                                </div>
                            </div>
                            <div class="col-lg-3 col-md-6 col-sm-12 col-xs-12 pad-b20">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label text-right no-padding-right" for="form-field-1-3">申请时间： </label>
                                    <div class="col-sm-8">
                                        <div class="input-daterange input-group">
                                            <input type="text" class="input-sm form-control hm-shop-upgrade" placeholder="开始时间" name="start" value="{$start}" id="start"  style="">
                                            <span class="input-group-addon" style="background: none;border: none;">
																	-
																</span>
                                            <input type="text" class="input-sm form-control hm-shop-upgrade" placeholder="结束时间" name="end" value="{$end}" id="end" >
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="text-right">
                                <button class="btn " style="width: 120px;    border-radius: 2rem; background: #fba40a!important;border-color: #fba40a;margin-left: 20px;">查询</button>
                            </div>
                        </form>
                        <div class="space"></div>
                        <div class="row">
                            <div class="col-xs-12">
                                <table id="sample-table-1" class="table table-hover" width="100%" style="table-layout:fixed">
                                    <thead>
                                    <tr>
                                        <th class="left">申请类型</th>
                                        <th class="left">申请说明</th>
                                        <th class="left">收款账号</th>
                                        <th class="left">收款方</th>
                                        <th class="left">申请金额</th>
                                        <th class="left">审核状态</th>
                                        <th class="left">初审人</th>
                                        <th class="left">审核意见</th>
                                        <th class="left">申请时间</th>
                                        <th class="center">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>

                                    {empty name="data"}
                                    <tr class="s_tr-vertical s_tr-border s_shoplist-first">
                                        <td colspan="10" class="center" style="color: red;">没有查询到结果</td>
                                    </tr>
                                    {/empty}

                                    {volist name="data" id="vo"}
                                    <tr class="s_tr-vertical s_tr-border s_shoplist-first">
                                        <td>
                                            {if condition='$vo.applyType == 1'}
                                            新公司筹建
                                            {elseif condition='$vo.applyType == 2'/}
                                            其他
                                            {/if}
                                        </td>
                                        <td>
                                            {$vo.applyExplain}
                                        </td>
                                        <td>
                                            {$vo.collectionAccount}
                                        </td>
                                        <td class="s_shop-input left">
                                            {$vo.payee}
                                        </td>
                                        <td class="left">{$vo.applyMoney}</td>
                                        <td class="left">
                                            {if condition='($vo.firstApprove == 1) AND ($vo.finalApprove == 1)'}
                                            <span class="text-success">终审通过</span>
                                            {elseif condition='($vo.firstApprove == 1) AND ($vo.finalApprove == 2)'/}
                                            <span class="text-danger">终审未通过</span>
                                            {elseif condition='($vo.firstApprove == 1) AND (empty($vo.finalApprove))'/}
                                            <span class="text-success">初审通过</span>
                                            {elseif condition='($vo.firstApprove == 2) AND (empty($vo.finalApprove))'/}
                                            <span class="text-danger">初审未通过</span>
                                            {elseif condition='(empty($vo.firstApprove)) AND (empty($vo.finalApprove))'/}
                                            <span class="text-muted">未审核</span>
                                            {/if}
                                        </td>
                                        <td class="left">{$vo.firstJudgeName}</td>
                                        <td class="left">{$vo.firstOpinion}</td>
                                        <td class="left">{$vo.applyTime}</td>
                                        {if condition='(empty($vo.finalApprove))'}
                                        <td class="center s_order-fun border-right "><a href="{:url('purchase/check',['Id'=>$vo.Id])}" class="text-danger">审核</a></td>
                                        {else /}
                                        <td class="center s_order-fun border-right "><a href="{:url('purchase/applyDetail',['Id'=>$vo.Id])}" class="">详情</a></td>
                                        {/if}
                                    </tr>
                                    {/volist}
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.span -->
                        </div>
                        <!-- /.row -->


                    </div>
                    <!-- /.col -->
                </div>
            </div>
        </div>
    </div>
    <div class="text-center">
        <ul class="pagination">
            {$page}
        </ul>
    </div>

</div>
<script type="text/javascript">
    laydate.render({
        elem: '#start' //指定元素
    });
    laydate.render({
        elem: '#end' //指定元素
    });
</script>